<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\controller;

use cmf\controller\HomeBaseController;
use think\Db;

class IndexController extends HomeBaseController
{
    public function index()
    {
        $slide_list=Db::name('slide')->where(['status'=>1])->select()->toArray();
        foreach($slide_list as $key=>$value){
            $slide_list[$key]['key']=$key;
        }
        $this->assign('slide_list',$slide_list);
        return $this->fetch(':index');
    }

    public function test(){
     $type=$this->request->param('type');
     return $type;
    }
}
